# This Dockerfile is used by CI to publish the oc-mirror image.
FROM openshift/golang-builder@sha256:4820580c3368f320581eb9e32cf97aeec179a86c5749753a14ed76410a293d83 AS builder
ENV __doozer=update BUILD_RELEASE=202202160023.p0.g0a2b069.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202202160023.p0.g0a2b069.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=0a2b069 OS_GIT_VERSION=4.10.0-202202160023.p0.g0a2b069.assembly.stream-0a2b069 SOURCE_DATE_EPOCH=1644884917 SOURCE_GIT_COMMIT=0a2b069f4859606f9ac85e8d15761fdfb259cf55 SOURCE_GIT_TAG=v0.1.1-alpha.3-93-g0a2b069 SOURCE_GIT_URL=https://github.com/openshift/oc-mirror 
WORKDIR /go/src/github.com/openshift/oc-mirror
COPY . .
RUN make build

FROM openshift/ose-base:v4.10.0.20220216.010142
ENV __doozer=update BUILD_RELEASE=202202160023.p0.g0a2b069.assembly.stream BUILD_VERSION=v4.10.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=10 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.10.0-202202160023.p0.g0a2b069.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=0a2b069 OS_GIT_VERSION=4.10.0-202202160023.p0.g0a2b069.assembly.stream-0a2b069 SOURCE_DATE_EPOCH=1644884917 SOURCE_GIT_COMMIT=0a2b069f4859606f9ac85e8d15761fdfb259cf55 SOURCE_GIT_TAG=v0.1.1-alpha.3-93-g0a2b069 SOURCE_GIT_URL=https://github.com/openshift/oc-mirror 
COPY --from=builder /go/src/github.com/openshift/oc-mirror/bin/oc-mirror /usr/bin/

ENTRYPOINT ["/usr/bin/oc-mirror"]

LABEL \
        io.k8s.display-name="oc-mirror" \
        io.k8s.description="OpenShift is a platform for developing, building, and deploying containerized applications." \
        io.openshift.tags="openshift,cli,mirror" \
        io.openshift.release.operator="true" \
        name="openshift/ose-oc-mirror" \
        com.redhat.component="oc-mirror-plugin-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="oc-mirror" \
        release="202202160023.p0.g0a2b069.assembly.stream" \
        io.openshift.build.commit.id="0a2b069f4859606f9ac85e8d15761fdfb259cf55" \
        io.openshift.build.source-location="https://github.com/openshift/oc-mirror" \
        io.openshift.build.commit.url="https://github.com/openshift/oc-mirror/commit/0a2b069f4859606f9ac85e8d15761fdfb259cf55" \
        version="v4.10.0"

